package proyecto;


import org.apache.log4j.Logger;
import org.apache.log4j.xml.DOMConfigurator;
import es.upv.dsic.gti_ia.core.AgentID;
import es.upv.dsic.gti_ia.core.AgentsConnection;

public class Main {
	
	private static final int initialBatteryCharge = 75;
	
    public static void main(String[] args) {
        DOMConfigurator.configure("src/thematrix/configuration/loggin.xml"); // ERR
        Logger logger = Logger.getLogger(Main.class);
        
        // QPID
        AgentsConnection.connect("localhost",5672, "test", "guest", "guest", false);
            System.out.println("Main: Creando dispositivos");
            Drone drone;
        try {
            drone = new Drone(new AgentID("Smith"), new Pair(0, 0), initialBatteryCharge);
            Satelite satelite = new Satelite(new AgentID("Anderson"));
            System.out.println("Main: Arrancando agentes");
            satelite.start();
            drone.start();
        } catch (Exception ex) {
            System.err.println("Main: Error al crear los agentes");
            System.exit(-1);
        }
        
    }
}